import { BroadCastCall } from "../../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../../Framework/MQ/MessageBlock";
import { SAttribute } from "../../../../../../Message/Public/SAttribute";
import { PetMingHuntLevelInfo } from "../../../../view/pet/info/PetMingHuntLevelInfo";
import { NetDispatcher } from "../../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../../mvc/ServerCommand";
//class PetMingHuntLevelCommand
    
    export  class PetMingHuntLevelCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc5=null;
            super.call(arg1);
            var loc1=arg1.messageBase as SAttribute;
            var loc2=new PetMingHuntLevelInfo();
            loc2.juTimes = loc1.value;
            var loc3=loc1.valueStr.split(",");
            var loc4=[];
            var loc6=0;
            while (loc6 < loc3.length) 
            {
                if ((loc5 = loc3[loc6]) != "") 
                {
                    loc4.push(int(loc5));
                }
                ++loc6;
            }
            loc2.levelArray = loc4;
            _cache.petMing.huntLevelInfo = loc2;
            NetDispatcher.dispatchCmd(ServerCommand.PetMingHuntLevelCommand, loc2);
            return;
        }
    }
